<template>
    <div>
        <Teleport to="#before-navigation" v-if="targetExists">
            <ProfileCard :isShowLastaccess="false" :isShowUserPicture="true"></ProfileCard>
        </Teleport>
        <MyCourse></MyCourse>
    </div>
</template>

<script setup lang="ts">
import ProfileCard from '@/components/ProfileCard.vue'
import MyCourse from '@/components/MyCourse.vue'
import { onMounted, ref } from 'vue'

const targetExists = ref(false)

onMounted(() => {
    targetExists.value = !!document.querySelector('#before-navigation')
})
</script>
